import javax.swing.*;
public class ListTest extends JFrame {
	
	public ListTest() {
		JPanel jp = new JPanel();
		JList list = new JList();
		DefaultListModel dist = new DefaultListModel();
		dist.addElement("Monday");
		dist.addElement("Tuesday");
		dist.addElement("Wednesday");
		dist.addElement("Thurday");
		dist.addElement("Friday");
		dist.addElement("saturday");
		dist.addElement("Sunday");
		list.setModel(dist);
		jp.add(list);
		setTitle("List");
		setSize(300, 300);
		setVisible(true);
		add(jp);
	}
	
	public static void main(String[ ] args) {
		ListTest lt = new ListTest();
	}
}
